#include <stdio.h>


#include <fcntl.h>
#include <unistd.h>

//#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>

int fd = 0;
char *hello_node = "/dev/nrf2410";
	

int c_nrf_open(void)
{
	
	fd = open(hello_node,O_RDWR);
	
	
    return fd;
}
int c_nrf_send(char * data)
{
	
	
	if(!fd){
		
		write(fd,data, 15);
		
	}else{
		
		
		printf("please open node first\n");
		
	}
	
	
	
	return 0;
}


int c_nrf_close(void)
{
	
	if(!fd)close(fd);
	
	return 0;
}


